<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/5/8 0008
 * Time: 13:05
 */
?>
<!--编辑框-->
<div class="box box-info">
    <div class="box-header">
        <h3 class="box-title">CK Editor
            <small>Advanced and full of features</small>
        </h3>
        <!-- tools box -->
        <div class="pull-right box-tools">
            <button type="button" class="btn btn-info btn-sm" data-widget="collapse" data-toggle="tooltip"
                    title="Collapse">
                <i class="fa fa-minus"></i></button>
            <button type="button" class="btn btn-info btn-sm" data-widget="remove" data-toggle="tooltip"
                    title="Remove">
                <i class="fa fa-times"></i></button>
        </div>
        <!-- /. tools -->
    </div>
    <!-- /.box-header -->
    <div class="box-body pad">
        <form>
                    <textarea id="editor1" name="editor1" rows="10" cols="80">
                                            This is my textarea to be replaced with CKEditor.
                    </textarea>
        </form>
    </div>
</div>
<script src="<?= $url_base ?>/assets/public/component/ckeditor/ckeditor.js"></script>
<script src="<?= $url_base ?>/assets/public/component/ckeditor/config.js"></script>
<script src="<?= $url_base ?>/assets/public/component/ckeditor/styles.js"></script>
<script>
$(function () {
    // Replace the <textarea id="editor1"> with a CKEditor
    // instance, using default configuration.
    CKEDITOR.replace('editor1');
    //bootstrap WYSIHTML5 - text editor
    $('.textarea').wysihtml5();
})
</script>